package org.xq.mq.component;

import org.xq.mq.constant.Constants;
import org.xq.mq.model.RedisQueueMessage;
import org.xq.mq.service.RedisQueueConsumer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class GoodsConsumer implements RedisQueueConsumer {

    @Override
    public String getQueueName() {
        return Constants.GOODS_CONSUMER_QUEUE_NAME;
    }

    @Override
    public void getMessage(RedisQueueMessage redisQueueMessage) {
        log.info("\n接收到了消息: "+redisQueueMessage.toString());
    }

    @Override
    public void error(String error) {
    }
}
